#ifndef REFLECTOR_H
#define REFLECTOR_H

#include "Mesh.h"

class Reflector : public Mesh
{

	public:
		Reflector();
		virtual ~Reflector();
			
		virtual void drawReflection(const Mesh* mesh)=0;


		HRESULT createReflectionTexture2D(ID3D11Device* g_dev, const D3D11_TEXTURE2D_DESC& desc);
		HRESULT createDepthTexture2D(ID3D11Device* g_dev, const D3D11_TEXTURE2D_DESC& desc);
		HRESULT createRenderTargetView(ID3D11Device* g_dev, const D3D11_RENDER_TARGET_VIEW_DESC& rtv_desc);
		HRESULT createShaderResourceView(ID3D11Device* g_dev, const D3D11_SHADER_RESOURCE_VIEW_DESC& srv_desc);
		HRESULT createDepthStencilView(ID3D11Device* g_dev, const D3D11_DEPTH_STENCIL_VIEW_DESC& dsv_desc);

		void setRenderTarget(ID3D11DeviceContext* g_context) const;

		void passReflectionSRV(ID3DX11EffectShaderResourceVariable** fx_srv);

	private:
		ID3D11Texture2D* tex_reflections;
		ID3D11RenderTargetView* rtv_reflections;
		ID3D11ShaderResourceView* srv_reflections;

		ID3D11Texture2D* tex_reflections_depth;
		ID3D11DepthStencilView* dsv_reflections_depth;
};



#endif